home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 580 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  5.8 KB

  1. Date:     Fri, 29 Oct 1993 10:59:10 +0100
  2. From: Thomas Schulze <ts@uni-paderborn.de>
  3. Message-Id: <199310290959.AA16316@teneriffa.uni-paderborn.de>
  4. To: mint-ip@fiction.ms.sub.org
  5. Subject: Re: MiNT-Net 0.0 , patch-001-tfs
  6. In-Reply-To: Mail from 'Kay Roemer <roemer@informatik.uni-frankfurt.de>'
  7.       dated:     Tue, 26 Oct 1993 10:57:55 +0100
  8. Errors-To: daniel@ms.sub.org
  9. Precedence: bulk
  10.  
  11. Hello everyone,
  12.  
  13. here are some (unofficial, although i sent them to kay, too) patches
  14. for MiNT-net. These will transform the device driver to xdd form,
  15. which means MiNT >= 1.08 loads it when booting. The rest is some
  16. rudimentary TurboC support for the lib and the test programs.
  17.  
  18. Have fun,
  19.  
  20. Thomas Schulze.
  21. ts@uni-paderborn.de
  22.  
  23.  
  24. --- /home/mint-net/net/makefile    Mon Oct 25 21:48:52 1993
  25. +++ net/makefile    Wed Oct 27 11:47:02 1993
  26. @@ -11,15 +11,24 @@
  27.  # only if you have applyed my patches for Fselect() or if a newer MiNT
  28.  # version implements this.
  29.  #
  30. -# CPPFLAGS = -I../include -DNEW_SELECT
  31. +# Commment out the definition of SELFINSTALL if you want an old style
  32. +# device driver, ie a tos program. With SELFINSTALL you get sockdev.xdd
  33. +# which MiNT will load while booting if its in /mint. 
  34. +#
  35. +SELFINST = -DSELFINSTALL
  36. +CPPFLAGS = -I../include -DNEW_SELECT $(SELFINST)
  37.  
  38. -CPPFLAGS = -I../include
  39. +#CPPFLAGS = -I../include
  40.  CFLAGS = -Wall -mshort -O2 -fomit-frame-pointer
  41.  
  42. -SRCS = sockdev.c sockutil.c main.c intr.s
  43. -OBJS = sockdev.o sockutil.o main.o intr.o
  44. +SRCS = startup.s main.c sockdev.c sockutil.c intr.s
  45. +OBJS = startup.o main.o sockdev.o sockutil.o intr.o
  46.  
  47. +ifeq ($(SELFINST), -DSELFINSTALL)
  48. +DEVDRV = sockdev.xdd
  49. +else
  50.  DEVDRV = sockdev.tos
  51. +endif
  52.  
  53.  SUBDIRS = unix
  54.  DOMAINS = unix/sock.a
  55. @@ -33,12 +42,19 @@
  56.      $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
  57.  
  58.  sockdev: $(OBJS) $(DOMAINS)
  59. +ifeq ($(SELFINST), -DSELFINSTALL)
  60. +    $(LD) -s -o $(DEVDRV) $(OBJS) $(DOMAINS) -lgnu16
  61. +else
  62.      $(CC) $(CFLAGS) $(OBJS) $(DOMAINS) -o $(DEVDRV)
  63. +endif
  64.      toglclr -super $(DEVDRV)
  65.      chmod +x $(DEVDRV)
  66.  
  67.  $(DOMAINS):
  68.      @for i in $(SUBDIRS); do $(MAKE) -C $$i; done;
  69. +
  70. +install: $(DEVDRV) 
  71. +    cp $(DEVDRV) /mint
  72.      
  73.  clean:
  74.      rm -f $(OBJS)
  75. --- /home/mint-net/net/main.c    Mon Oct 25 17:17:30 1993
  76. +++ net/main.c    Wed Oct 27 13:04:12 1993
  77. @@ -1,5 +1,7 @@
  78. +#ifndef SELFINSTALL
  79.  #include <minimal.h>
  80.  #include <basepage.h>
  81. +#endif
  82.  #include <osbind.h>
  83.  #include <mintbind.h>
  84.  #include "atarierr.h"
  85. @@ -21,14 +23,37 @@
  86.      0
  87.  };
  88.  
  89. +void welcome (void);
  90.  
  91. -void
  92. -welcome (void)
  93. +#ifdef SELFINSTALL
  94. +DEVDRV *
  95. +initialize (struct kerinfo *ker)
  96.  {
  97. -    Cconws ("MiNT-Net 0.0, pre alpha test version\r\n");
  98. -    Cconws ("(w) 1993, Kay Roemer.\r\n");
  99. -}
  100. +    /* since mint-1.08 we have xdd's which are loaded when
  101. +     * booting. so here are changes to make it work that way.
  102. +     */
  103. +    short i;
  104. +    long res;
  105. +
  106. +    KERINFO = ker;
  107. +
  108. +    welcome();
  109. +
  110. +    res = d_cntl (DEV_INSTALL, sockdev_name, &sockdev_descr);
  111. +
  112. +    if (!res || res == EINVFN)
  113. +      {
  114. +        c_conws ("Unable to install net device!\r\n");
  115. +        return (DEVDRV *) 0;
  116. +      }
  117. +
  118. +    for (i = 0; init_func[i]; ++i) {
  119. +        (*init_func[i]) ();
  120. +    }
  121.  
  122. +    return (DEVDRV *) 1;
  123. +}
  124. +#else
  125.  int
  126.  main (argc, argv)
  127.      short argc;
  128. @@ -50,3 +75,12 @@
  129.      /* NOTREACHED */
  130.      return 0;
  131.  }
  132. +#endif
  133. +
  134. +void
  135. +welcome (void)
  136. +{
  137. +    c_conws ("pMiNT-Net 0.0q, pre alpha test version\r\n");
  138. +    c_conws ("(w) 1993, Kay Roemer.\r\n");
  139. +}
  140. +
  141. --- /dev/null    Wed Oct 27 17:26:04 1993
  142. +++ net/startup.s    Wed Oct 27 10:36:36 1993
  143. @@ -0,0 +1,4 @@
  144. +
  145. +    jmp _initialize
  146. +
  147. +
  148. --- /dev/null    Wed Oct 27 17:26:06 1993
  149. +++ lib/makefile.tcc    Wed Oct 27 16:51:24 1993
  150. @@ -0,0 +1,51 @@
  151. +#
  152. +#    Makefile for the socket library.
  153. +#    modified by Thomas Schulze for use with TurboC
  154. +#
  155. +
  156. +SHELL = /bin/sh
  157. +
  158. +# this is written to use my own tcc driver. its very experimental
  159. +# and an awfull mess of hacks and tricks, so i will probably not
  160. +# distribute it in the near future:-((
  161. +
  162. +CC = tcc -v
  163. +LD = tcc -v -d
  164. +
  165. +#
  166. +# if you define UNX2DOS, all path names specified by `struct sockaddr_un'
  167. +# will be converted from unix style to dos style prior to passing them
  168. +# to the OS. Note that this is time consuming, espacially for sendto().
  169. +#
  170. +CPPFLAGS = -I=..\\include -DUNX2DOS
  171. +# -fabsolute-calls means use absolute calls inside modules when calling
  172. +# functions. (means -P for TC users...)
  173. +CFLAGS = -fabsolute-calls
  174. +
  175. +SRCS = socket.c socketpair.c bind.c listen.c connect.c accept.c \
  176. +  recv.c send.c recvfrom.c sendto.c shutdown.c getsockname.c \
  177. +  getpeername.c getsockopt.c setsockopt.c strerror.c perror.c
  178. +
  179. +OBJS = socket.o socketpair.o bind.o listen.o connect.o accept.o \
  180. +  recv.o send.o recvfrom.o sendto.o shutdown.o getsockname.o \
  181. +  getpeername.o getsockopt.o setsockopt.o strerror.o perror.o
  182. +
  183. +SOCKETLIB = socket.lib
  184. +
  185. +.c.o:
  186. +    $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
  187. +
  188. +all: lib 
  189. +
  190. +lib: $(OBJS)
  191. +    $(LD) -G -J -o $(SOCKETLIB) $(OBJS)
  192. +
  193. +clean:
  194. +    rm -f $(OBJS) *.trg
  195. +
  196. +depend:
  197. +    $(CC) -MM $(CPPFLAGS) *.c > depend
  198. +
  199. +ifeq (depend, $(wildcard depend))
  200. +include depend
  201. +endif
  202. --- /dev/null    Wed Oct 27 17:26:08 1993
  203. +++ test/makefile.tcc    Wed Oct 27 17:03:40 1993
  204. @@ -0,0 +1,44 @@
  205. +#
  206. +#    Makefile for the Mint-Net "test suite"
  207. +#
  208. +
  209. +all: server client sockpair dgram dgramd speed speedd
  210. +
  211. +CC = tcc -v
  212. +CFLAGS = -fabsolute-calls
  213. +CPPFLAGS = -I=..\\lib
  214. +LIBS = socket.lib
  215. +
  216. +server: server.o
  217. +    $(CC) $(CFLAGS) server.o $(LIBS) -o server.ttp
  218. +    chmod +x server.ttp
  219. +
  220. +client: client.o
  221. +    $(CC) $(CFLAGS) client.o $(LIBS) -o client.ttp
  222. +    chmod +x client.ttp
  223. +
  224. +speed: speed.o
  225. +    $(CC) $(CFLAGS) speed.o $(LIBS) -o speed.ttp
  226. +    chmod +x speed.ttp
  227. +
  228. +speedd: speedd.o
  229. +    $(CC) $(CFLAGS) speedd.o $(LIBS) -o speedd.ttp
  230. +    chmod +x speedd.ttp
  231. +
  232. +sockpair: sockpair.o
  233. +    $(CC) $(CFLAGS) sockpair.o $(LIBS) -o sockpair.ttp
  234. +    chmod +x sockpair.ttp
  235. +
  236. +dgram: dgram.o
  237. +    $(CC) $(CFLAGS) dgram.o $(LIBS) -o dgram.ttp
  238. +    chmod +x dgram.ttp
  239. +
  240. +dgramd: dgramd.o
  241. +    $(CC) $(CFLAGS) dgramd.o $(LIBS) -o dgramd.ttp
  242. +    chmod +x dgramd.ttp
  243. +
  244. +# No dependencies jet
  245. +depend:
  246. +
  247. +clean:
  248. +    rm -f *.o
  249.  
  250.